package br.edu.ufcg.splab.util;

import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.UUID;

import br.edu.ufcg.splab.core.InterfaceVertex;
import br.edu.ufcg.splab.core.edges.EdgeType;
import br.edu.ufcg.splab.core.graph.Graph;



//TODO nao esta impelmentada

public class ReadTestSuite {

	private Map<String, UUID> aux = new HashMap<String, UUID>();
	private Graph graph;

	/**
	 * @param tgf file name
	 * @return graph specified in tgf
	 * @throws Exception
	 */
	public Graph getGraph(String fileName) throws Exception {
		int cont = 0;

		File file = new File(fileName);
		Scanner scanner = new Scanner(file);
		scanner.useDelimiter("\\s");
		graph = new Graph();
		String line = "";
		boolean a = scanner.hasNextLine();
	
		while (a) {
			line = scanner.nextLine().trim();
			String[] linhaSplit = line.split(" ");
	
			
			System.out.println(linhaSplit);
			
			
			
			
//			if(linhaSplit.length> 1){
//				String	from = linhaSplit[3];
//				String	to =linhaSplit[6].replace(">", "");
//				
//			}
	
			

		}

		scanner.close();
		cont = 0;
		return graph;
	}

	/**
	 * 
	 * @param the
	 *            label vertex
	 *            
	 * @return the UUID vertex
	 */
	public UUID getUUID(String label) {
		return aux.get(label);
	}
//
//	public static void main(String[] args) {
//		ReadTestSuite l = new ReadTestSuite();
//		Graph g = null;
//		try {
//			g = l.getGraph("saida3.xml");
//
//		} catch (Exception e) {
//			System.out.println(e.getMessage());
//		}
//
//	}

}
